#ifndef CAR_MAINTENANCE_H
#define CAR_MAINTENANCE_H

#include "car_maintenance_struct_csv.hpp"
#include "csv_struct.hpp"


class car_maintenance
{
  public:
	car_maintenance() { }
	virtual ~car_maintenance();
	
	// total amount of money spent for fuel in the period
	// virtual float total_amount(int _plate_id, date _first_date, date _last_date, bool _include_last_date = true) =0;

  private:
};



// implementation for csv files

class car_maintenance_csv: public car_maintenance
{
  public:
	car_maintenance_csv(char* filename): file(filename)
	{ }

	static float total_amount(int _plate_id, boost::gregorian::date _first_date, boost::gregorian::date _last_date, bool _include_last_date = true); 	

  protected:
	static bool check_parm(car_maintenance_struct_csv& row, 
		int _plate_id, boost::gregorian::date _first_date, boost::gregorian::date _last_date, bool _include_last_date = true);


  private:
	std::string file;
};
#endif
